package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * GlryCwfzr generated by hbm2java
 */
@Entity
@Table(name = "glry_cwfzr")
public class GlryCwfzr implements java.io.Serializable
{

    private Long id;
    private int version;
    private Glry glry;
    private String username;
    private String operation;
    private Date optdate;
    private Short zysp;
    private Short xyys;
    private Short jyjs;
    private Short tdys;
    private Set<Glry> glries = new HashSet<Glry>( 0 );

    public GlryCwfzr()
    {
    }

    public GlryCwfzr( Long id )
    {
        this.id = id;
    }

    public GlryCwfzr( Long id,
                      Glry glry,
                      String username,
                      String operation,
                      Date optdate,
                      Short zysp,
                      Short xyys,
                      Short jyjs,
                      Short tdys,
                      Set<Glry> glries )
    {
        this.id = id;
        this.glry = glry;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.zysp = zysp;
        this.xyys = xyys;
        this.jyjs = jyjs;
        this.tdys = tdys;
        this.glries = glries;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "glr_ID")
    public Glry getGlry()
    {
        return this.glry;
    }

    public void setGlry( Glry glry )
    {
        this.glry = glry;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "zysp")
    public Short getZysp()
    {
        return this.zysp;
    }

    public void setZysp( Short zysp )
    {
        this.zysp = zysp;
    }

    @Column(name = "xyys")
    public Short getXyys()
    {
        return this.xyys;
    }

    public void setXyys( Short xyys )
    {
        this.xyys = xyys;
    }

    @Column(name = "jyjs")
    public Short getJyjs()
    {
        return this.jyjs;
    }

    public void setJyjs( Short jyjs )
    {
        this.jyjs = jyjs;
    }

    @Column(name = "tdys")
    public Short getTdys()
    {
        return this.tdys;
    }

    public void setTdys( Short tdys )
    {
        this.tdys = tdys;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "glryCwfzr")
    public Set<Glry> getGlries()
    {
        return this.glries;
    }

    public void setGlries( Set<Glry> glries )
    {
        this.glries = glries;
    }

}
